package com.sso.service.impl;

import java.util.List;

import com.sso.dao.IDicUserHumanDao;
import com.sso.entity.DicSystemUser;
import com.sso.entity.DicUserHuman;
import com.sso.service.IDicUserHumanService;

public class DicUserHumanServiceImpl implements IDicUserHumanService{
	private IDicUserHumanDao dicUserHumanDao;
	
	public IDicUserHumanDao getDicUserHumanDao() {
		return dicUserHumanDao;
	}

	public void setDicUserHumanDao(IDicUserHumanDao dicUserHumanDao) {
		this.dicUserHumanDao = dicUserHumanDao;
	}

	@Override
	public void deleteDicUserSystem(DicUserHuman usersystem) {
		dicUserHumanDao.delete(usersystem);
	}

	@Override
	public List<DicUserHuman> getAllUserSystem() {
		return dicUserHumanDao.getAll();
	}

	@Override
	public DicUserHuman getByUserSystemID(String usersystemID) {
		return dicUserHumanDao.getById(usersystemID);
	}

	@Override
	public void saveDicUserHuman(DicUserHuman usersystem) {
		dicUserHumanDao.saveOrUpdate(usersystem);
	}

	@Override
	public List<DicUserHuman> getUserHumanBySystemId(String Userid,
			String SystemId) {
		return dicUserHumanDao.findAllByNamedQuery("duh.getUserHumanBySystemId", Userid,SystemId);
	}
	
}
